package com.gouqi.tools.service.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gouqi.gouqitoolscommon.model.entity.Role;
import com.gouqi.tools.mapper.RoleMapper;
import com.gouqi.tools.service.RoleService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @description 针对表【role(角色表)】的数据库操作Service实现
 */
@Service
public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role>
        implements RoleService {

    @Resource
    private RoleMapper roleMapper;

    @Override
    public List<String> getRolePermissionsByAccessKey(List<String> roles) {
        List<String> permissions = roleMapper.getRolePermissionsByAccessKey(roles);
        return permissions;
    }

    @Override
    public List<String> getRolePermissionsByUserAccount(List<String> roles) {
        List<String> permissions = roleMapper.getRolePermissionsByUserAccount(roles);
        return permissions;
    }
}




